package com.b.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 分区表
 */
@Document(indexName = "category")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Category {
    /**
     * 分区ID
     */
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;

    /**
     * 分区名称
     */
    @Field(type = FieldType.Text, index = true , store = true, analyzer = "ik_max_word")
    private String type;
}